package com.changeover.gwt.shared.datasource.impl;

import java.util.Date;
import java.util.List;

import com.changeover.gwt.shared.datasource.ICustomerDataSource;
import com.changeover.gwt.shared.model.customer.ComplexCustomer;
import com.changeover.gwt.shared.model.customer.ICustomer;
import com.changeover.gwt.shared.model.customer.LastAction;
import com.google.common.collect.ImmutableList;

public class StandardCustomerDataSource implements ICustomerDataSource {

    private final List<LastAction> lastActions = ImmutableList.of(new LastAction(1, "correspondence started"),
                                                                  new LastAction(2, "not responding"));

    private final List<ICustomer> customers = ImmutableList.<ICustomer> of(new ComplexCustomer(815, "Donald Duk", "A",
                                                                                               new LastAction(1, "correspondence started"), null),
                                                                           new ComplexCustomer(1234, "Chuck Noris",
                                                                                               "A", new LastAction(2, "not responding"),
                                                                                               new Date(2012, 5, 23)),
                                                                           new ComplexCustomer(4711, "Bibi Blocksber", "A",
                                                                                               new LastAction(1, "correspondence started"), null),
                                                                           new ComplexCustomer(5555, "Trapper Joch MD 1",
                                                                                               "A", new LastAction(1, "correspondence started"), new Date(2012, 5, 23)),
                                                                           new ComplexCustomer(7, "Trapper Joch MD",
                                                                                               "A", new LastAction(1, "correspondence started"), null));
    
    
    @Override
    public List<ICustomer> getCustomers() {
        return customers;
    }

    @Override
    public List<LastAction> getLastActions() {
        return lastActions;
    }
}
